package com.yb.nowcoder;

import java.util.Scanner;

/**
 * 华为机试练习第4题
 */
public class Main4 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNextLine()) {
            String s1 = in.nextLine();
            String s2 = in.nextLine();
            int zeroCount1 = s1.length() % 8 == 0 ? 0 : 8 - s1.length() % 8;
            int zeroCount2 = s2.length() % 8 == 0 ? 0 : 8 - s2.length() % 8;
            for (int i = 0; i < zeroCount1; i++) {
                s1 += "0";
            }
            for (int i = 0; i < zeroCount2; i++) {
                s2 += "0";
            }
            while (s1.length() > 0) {
                System.out.println(s1.substring(0, 8));
                s1 = s1.substring(8);
            }
            while (s2.length() > 0) {
                System.out.println(s2.substring(0, 8));
                s2 = s2.substring(8);
            }
        }
    }
}
